/*
 * @Author: 詹真琦(legendryztachi@gmail.com)
 * @Date: 2022-05-23 15:02:02
 * @LastEditors: 詹真琦(legendryztachi@gmail.com)
 * @LastEditTime: 2022-05-24 17:37:44
 * @FilePath: \code\ctp-static-portal-front\src\components\mixins.js
 * @Description:
 */
export const rowList = {
  props: {
    sectionData: {
      type: Object
    }
  },
  data() {
    return {
      rowList: []
    };
  },
  created() {
    this.rowList = this.sectionData.data.rowList || this.options.rowList?.split(',') || [];
  }
};

export const image = {
  data() {
    return {
      imageStyle: 'full'
    };
  },
  created() {
    switch (this.options.pictureStyle) {
      case '0':
        this.imageStyle = 'cover';
        break;
      case '1':
        this.imageStyle = 'contain';
        break;
    }
  }
};
